import { lazy } from 'react'
import { RouteItem, RouteList } from '../utils/type'
const sysRoutes: RouteItem[] = [
  {
    path: '/home/system/menu',
    element: lazy(() => import('../page/system/menu/index')),
    title: '菜单管理'
  },
  {
    path: '/home/system/user',
    element: lazy(() => import('../page/system/user/index')),
    title: '用户'
  },

]

export const homeRoutes: RouteItem[] = [
  {
    path: '/home/index',
    element: lazy(() => import('../page/main/Index')),
    title: '首页'
  },
  {
    path: '/home/role',
    element: lazy(() => import('../page/role/index')),
    title: '项目'
  },
  {
    path: '/home/system',
    element: lazy(() => import('../page/system/index')),
    title: '模块中心',
    children: sysRoutes
  },
  {
    path: '/home/pinpai',
    element: lazy(() => import('../page/pinpai/Index')),
    title: '品牌'
  },
  {
    path: '/home/yingyong',
    element: lazy(() => import('../page/yingyong/Index')),
    title: '应用'
  },

 
]
const routeList: RouteList = {
  mode: 'history',
  routes: [
    {
      path: '/',
      to: '/home'
    },
    {
      path: '/home',
      element: lazy(() => import('../page/home/Index')),
      children: homeRoutes
    },
    {
      path: '/login',
      element: lazy(() => import('../page/login/Index'))
    },
    {
      path: '*',
      element: lazy(() => import('../page/error/index'))
    },
    {
      path: '/job',
      element: lazy(() => import('../page/job/Index'))
    },
        {
      path: '/shiyan',
      element: lazy(() => import('../page/shiyan/shiyan'))
    },
   
  ]
}




export default routeList

